/**
 * Created by Administrator on 2017/3/12 0012.
 */
import Relay from "react-relay";

export default class FindServiceDicListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findAllServiceDicList }`;
    }

    getVariables() {
        return {
            argsInput: {
                parentId: this.props.parentId,
                level: this.props.level,
                enid:this.props.enid,
                requestPlat:"manager"
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findAllServiceDicListPayload {
            data {
              errorCode
                        value
                        totalResult
                        id
                        token
                        dicList{
                            parentId
                            name
                            dicId
                            enid
                            level
                            subList{
                                  parentId
                                   name
                                   dicId
                                   enid
                                   level 
                                   subList{
                                        parentId
                                        name
                                        dicId
                                        enid
                                        level 
                                   }
                            }
                          
                        }
               
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on findAllServiceDicListPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        token
                        dicList{
                            parentId
                            name
                            dicId
                            enid
                            level
                            subList{
                                  parentId
                                   name
                                   dicId
                                   enid
                                   level 
                                   subList{
                                        parentId
                                        name
                                        dicId
                                        enid
                                        level 
                                   }
                            }
                          
                        }
                     
                    }
                }
            `]
        }];
    }

}